// @ts-ignore
/* eslint-disable */
import request from '@/utils/request';

/** 更新 */
export async function updateCatGroupPerList(params: any) {
  return request('/api/v1/permission/updateCatGroupPerList', {
    method: 'POST',
    params: {
      catId: params.catId,
    },
    data: params.groupPerList,
  });
}

/** 查询 */
export async function getCatGroupPerList(params: any) {
  return request('/api/v1/permission/getCatGroupPerList', {
    method: 'GET',
    params: params,
  });
}

/** 更新 */
export async function updateGroupPerMenuList(params: any) {
  return request('/api/v1/permission/updateGroupPerMenuList', {
    method: 'POST',
    data: params.groupPerList,
  });
}

/** 查询 */
export async function getGroupPerMenuList() {
  return request('/api/v1/permission/getGroupPerMenuList', {
    method: 'GET',
  });
}

/** 查询 */
export async function getMenuIdListByRoleId(params) {
  return request('/api/v1/permission/getMenuIdListByRoleId', {
    method: 'GET',
    params: params,
  });
}
export async function getCataIdListByRoleId(params) {
  return request('/api/v1/permission/getCataIdListByRoleId', {
    method: 'GET',
    params: params,
  });
}

/** 更新权限 */
export async function updateRoleMenuList(params: any) {
  return request('/api/v1/permission/updateRoleMenuList', {
    method: 'POST',
    data: params,
  });
}
/** 更新权限 */
export async function updateRoleCataList(params: any) {
  return request('/api/v1/permission/updateRoleCataList', {
    method: 'POST',
    data: params,
  });
}
